home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d3 / rettig.arc / TRSOURCE.EXE / LASTDAY.C < prev    next >
C/C++ Source or Header  |  1990-10-22  |  479b  |  24 lines

  1. /*********
  2. *  LASTDAY.C
  3. *
  4. *  by Tom Rettig
  5. *
  6. * Placed in the public domain by Tom Rettig Associates, 10/22/1990.
  7. *
  8. *  Syntax: LASTDAY( <month>, <year> )
  9. *  Return: Last day of the month
  10. *          Zero if invalid <month> or <year>
  11. *  Note  : Valid month is 1..12, year is 1..9999
  12. ********/
  13.  
  14. #include "trlib.h"
  15.  
  16. TRTYPE lastday()
  17. {
  18.    if ( PCOUNT == 2 && ISNUM(1) && ISNUM(2) )
  19.       _retni( _tr_ldm(_parni(1),_parni(2)) );
  20.    else
  21.       _retni( ERROR );
  22. }
  23.  
  24.